package thread;

//Runnable 描述一个"要执行的任务"
class MyRunnable implements Runnable{

    @Override
    public void run() {
        System.out.println("hello Thread");
    }
}
public class TreadDemo2 {
    public static void main(String[] args) {
        Runnable runnable = new MyRunnable();
        Thread thread = new Thread(runnable);
        thread.start();
    }
}
